package com.example.cinema.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author yc138
 * @since 2024-08-26
 */
@Getter
@Setter
@TableName("schedule")
public class Schedule implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("hid")
    @NotNull(message = "请选择播放影厅")
    private Integer hid;

    @TableField("mid")
    @NotNull(message = "请输入需要排片的电影")
    private Integer mid;

    @TableField("start")
    @NotNull(message = "请选择开始时间")
    private LocalDateTime start;

    @TableField("end")
    @NotNull(message = "请选择结束时间")
    private LocalDateTime end;

    @TableField("price")
    @NotNull(message = "请输入价格")
    private Double price;

    @TableField("left_ticket")
    @NotNull(message = "请输入总票数")
    private Integer leftTicket;

    @TableField(exist = false)
    private Movie movie;

    @TableField(exist = false)
    private Hall hall;

    @TableField(exist = false)
    private Integer total;

    @TableField(exist = false)
    private List<Orders> orders;

}
